const express = require('express')
const router = express.Router()
const { userList } = require('./login')


const getUserListHandler = (req,res) => {
    const name = req.auth.username
    const user = userList.filter(item=>item.username===name)
    res.send({
        status:0,
        message:'获取用户信息成功',
        data:{user,userList}
    })
}
router.get('/getuserlist', getUserListHandler)

module.exports = router